import Vue from 'vue'
import Router from 'vue-router'
import Indexs from '@/pages/Index'
import Login from '@/pages/Login'
import register from '@/pages/register'
import Product from '@/components/product/Product_index'
import Productbg4 from '@/components/product/Product_list_bg'
import Productbgck4 from '@/components/product/Product_list_bg_chakan'
import personal from '@/components/personalCenter/personal'
import userindex from '@/components/personalCenter/userindex'
import order from '@/components/personalCenter/order'
import updatePwd from '@/components/personalCenter/updatePwd'


Vue.use(Router) // 引入的vue-router.js

export default new Router({
  routes: [{
      path: '/',
      name: 'Indexs',
      component: Indexs
    },
    {
      path: '/login',
      name: 'Login',
      component: Login,
    },
    {
      path: '/register',
      component: register
    },
    {
      path: '/product',
      component: Product,
      children: [{
          path: '/',
          component: Productbg4
        },
        {
          path: '/productck4',
          component: Productbgck4
        }
      ]
    },
    { path: '/personal',component: personal,children:[
        {path:'/',component:userindex},
        {path:'/order',component:order},
        {path:'/updatePwd',component:updatePwd}
      ]
    }
  ]
})
